/* 
 * File:   pic18f2xk22flash.h
 * Author: apleilx
 *
 * Created on 2013
 */

#ifndef PIC18F2XK22FLASH_H
#define	PIC18F2XK22FLASH_H

#ifdef	__cplusplus
extern "C" {
#endif

    extern void _FlashReadBytes(unsigned long FlashAddress ,unsigned char Num,unsigned char *Destination );    //tested
    extern void _FlashReadOption(unsigned char Addr, unsigned char Num, unsigned char *Destination);
    extern void _FlashReadDeviceID(unsigned char *Destination);
    extern void _FlashReadUserID(unsigned char *Destination);
    extern void _FlashWriteUserID(unsigned char *Destination);
    extern void _FlashWritePage(unsigned long FlashAddress,unsigned char *Destination );
    extern void _EraseFlash(unsigned long startaddr);
    
    extern void EEP_WriteChar( unsigned int badd,unsigned char bdat );
    extern unsigned char EEP_ReadChar( unsigned int add);
    extern void EEP_Refurbish();

#ifdef	__cplusplus
}
#endif

#endif	/* PIC18F2XK22FLASH_H */

